package com.example.controller;

import com.example.entity.EleSafeManagement;
import com.example.service.EleSafeManageService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * Created by wang on 2018/4/30.
 */
@RestController
public class EleSafeManageController {

    @Autowired
    private EleSafeManageService eleSafeManageService;

    @ApiOperation(value = "上传电梯安全管理制度图片",notes = "上传电梯安全管理制度图片")
    @RequestMapping(value="api/eleSafeManagement/upload",method = RequestMethod.POST)
    Map<String,Object> fileInfoUpload(@RequestBody EleSafeManagement eleSafeManagement){
        return eleSafeManageService.eleSafeManageUpload(eleSafeManagement);
    }

    @ApiOperation(value = "查询电梯安全管理制度图片",notes = "查询电梯安全管理制度图片")
    @RequestMapping(value="api/eleSafeManagement/elevatorQuery",method = RequestMethod.POST)
    Map<String,Object> fileInfoQuery(@RequestBody String orgId){
        return eleSafeManageService.eleSafeManageQuery(orgId);
    }
}
